package server;

import java.io.FileWriter;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Calendar;

public class UserInputLogger {

	public static void log(String s) {
		String filename = "log"
				+ new SimpleDateFormat("yyyy-MM-dd").format(Calendar
						.getInstance().getTime()) + ".txt";
		FileWriter fileWriter;
		try {
			fileWriter = new FileWriter(filename, true);
			fileWriter.write(new SimpleDateFormat("HH-mm-ss").format(Calendar
					.getInstance().getTime()) + " " + s + "\n");
			fileWriter.close();
		} catch (IOException e) {
		}
	}
}
